	.file	"a1_help.c"
	.text
	.align	2
	.global	putc
	.type	putc, %function
putc:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r3, r1
	strb	r3, [fp, #-28]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	beq	.L4
	b	.L2
.L3:
	ldr	r3, .L11
	str	r3, [fp, #-20]
	ldr	r3, .L11+4
	str	r3, [fp, #-16]
	b	.L7
.L4:
	ldr	r3, .L11+8
	str	r3, [fp, #-20]
	ldr	r3, .L11+12
	str	r3, [fp, #-16]
	b	.L7
.L2:
	mvn	r3, #0
	str	r3, [fp, #-32]
	b	.L6
.L8:
	bl	checkTime(PLT)
.L7:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #0]
	mov	r3, r3, lsr #5
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L8
	ldrb	r2, [fp, #-28]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	str	r2, [r3, #0]
	mov	r3, #0
	str	r3, [fp, #-32]
.L6:
	ldr	r3, [fp, #-32]
	mov	r0, r3
	sub	sp, fp, #12
	ldmfd	sp, {fp, sp, pc}
.L12:
	.align	2
.L11:
	.word	-2138308584
	.word	-2138308608
	.word	-2138243048
	.word	-2138243072
	.size	putc, .-putc
	.align	2
	.global	getc
	.type	getc, %function
getc:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #24
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	beq	.L16
	b	.L14
.L15:
	ldr	r3, .L23
	str	r3, [fp, #-24]
	ldr	r3, .L23+4
	str	r3, [fp, #-20]
	b	.L19
.L16:
	ldr	r3, .L23+8
	str	r3, [fp, #-24]
	ldr	r3, .L23+12
	str	r3, [fp, #-20]
	b	.L19
.L14:
	mvn	r3, #0
	str	r3, [fp, #-32]
	b	.L18
.L20:
	bl	checkTime(PLT)
.L19:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #0]
	mov	r3, r3, lsr #4
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #0]
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	str	r3, [fp, #-32]
.L18:
	ldr	r3, [fp, #-32]
	mov	r0, r3
	sub	sp, fp, #12
	ldmfd	sp, {fp, sp, pc}
.L24:
	.align	2
.L23:
	.word	-2138308584
	.word	-2138308608
	.word	-2138243048
	.word	-2138243072
	.size	getc, .-getc
	.align	2
	.global	a2i
	.type	a2i, %function
a2i:
	@ args = 0, pretend = 0, frame = 20
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L26
.L27:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L28
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #47
	bhi	.L30
.L28:
	mvn	r3, #0
	str	r3, [fp, #-32]
	b	.L31
.L30:
	ldr	r2, [fp, #-16]
	mov	r3, r2
	mov	r3, r3, asl #2
	add	r3, r3, r2
	mov	r3, r3, asl #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	sub	r3, r3, #48
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L26:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L27
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-32]
.L31:
	ldr	r3, [fp, #-32]
	mov	r0, r3
	sub	sp, fp, #12
	ldmfd	sp, {fp, sp, pc}
	.size	a2i, .-a2i
	.align	2
	.global	cmp
	.type	cmp, %function
cmp:
	@ args = 0, pretend = 0, frame = 20
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #20
	str	r0, [fp, #-20]
	str	r1, [fp, #-24]
	str	r2, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L35
.L36:
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	ldrb	r1, [r3, #0]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r1, r3
	beq	.L37
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L39
.L37:
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L35:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L36
	mov	r3, #1
	str	r3, [fp, #-32]
.L39:
	ldr	r3, [fp, #-32]
	mov	r0, r3
	sub	sp, fp, #12
	ldmfd	sp, {fp, sp, pc}
	.size	cmp, .-cmp
	.align	2
	.global	copy
	.type	copy, %function
copy:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #16
	str	r0, [fp, #-20]
	str	r1, [fp, #-24]
	str	r2, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L43
.L44:
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r1, r2, r3
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	strb	r3, [r1, #0]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L43:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	blt	.L44
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	mov	r3, #0
	strb	r3, [r2, #0]
	sub	sp, fp, #12
	ldmfd	sp, {fp, sp, pc}
	.size	copy, .-copy
	.align	2
	.global	parseCommand
	.type	parseCommand, %function
parseCommand:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {r4, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L48
.L49:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L48:
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L49
	b	.L51
.L52:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L51:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L53
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L52
.L53:
	ldr	r3, [fp, #-36]
	mov	r0, r3
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-20]
	bl	copy(PLT)
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r2
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L55
.L56:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L55:
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L56
	b	.L58
.L59:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L58:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L60
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L59
.L60:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L62
	mov	r3, sp
	mov	r4, r3
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	add	r3, r3, #3
	add	r3, r3, #3
	mov	r3, r3, lsr #2
	mov	r3, r3, asl #2
	rsb	sp, r3, sp
	str	sp, [fp, #-48]
	ldr	r2, [fp, #-48]
	add	r3, r2, #3
	mov	r3, r3, lsr #2
	mov	r3, r3, asl #2
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-48]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	mov	r0, r3
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-20]
	bl	copy(PLT)
	ldr	r3, [fp, #-28]
	mov	r0, r3
	ldr	r1, [fp, #-20]
	bl	a2i(PLT)
	mov	r2, r0
	ldr	r3, [fp, #-36]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r3, r2
	str	r3, [fp, #-32]
	mov	sp, r4
.L62:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L64
.L65:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L64:
	ldr	r3, [fp, #-32]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L65
	b	.L67
.L68:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L67:
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L69
	ldr	r3, [fp, #-20]
	mov	r2, r3
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L68
.L69:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	ble	.L77
	mov	r3, sp
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	add	r3, r3, #3
	add	r3, r3, #3
	mov	r3, r3, lsr #2
	mov	r3, r3, asl #2
	rsb	sp, r3, sp
	str	sp, [fp, #-44]
	ldr	r2, [fp, #-44]
	add	r3, r2, #3
	mov	r3, r3, lsr #2
	mov	r3, r3, asl #2
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-44]
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r0, r3
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-20]
	bl	copy(PLT)
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #83
	beq	.L73
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	cmp	r3, #67
	bne	.L75
.L73:
	ldr	r3, [fp, #-24]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	str	r2, [r3, #8]
	b	.L76
.L75:
	ldr	r3, [fp, #-24]
	mov	r0, r3
	ldr	r1, [fp, #-20]
	bl	a2i(PLT)
	mov	r2, r0
	ldr	r3, [fp, #-36]
	str	r2, [r3, #8]
.L76:
	ldr	sp, [fp, #-40]
.L77:
	sub	sp, fp, #16
	ldmfd	sp, {r4, fp, sp, pc}
	.size	parseCommand, .-parseCommand
	.section	.rodata
	.align	2
.LC0:
	.ascii	"tr\000"
	.align	2
.LC1:
	.ascii	"terminal: move train #%d with speed %d\015\012\000"
	.align	2
.LC2:
	.ascii	"terminal: incorrect arguments for TR command\015\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"rv\000"
	.align	2
.LC4:
	.ascii	"terminal: reverse the train #%d\015\012\000"
	.align	2
.LC5:
	.ascii	"terminal: incorrect argument for RV command\015\012"
	.ascii	"\000"
	.align	2
.LC6:
	.ascii	"st\000"
	.align	2
.LC7:
	.ascii	"straight\000"
	.align	2
.LC8:
	.ascii	"branched\000"
	.align	2
.LC9:
	.ascii	"terminal: switch #%d is %s\015\012\000"
	.align	2
.LC10:
	.ascii	"terminal: incorrect arguments for ST command\015\012"
	.ascii	"\000"
	.align	2
.LC11:
	.ascii	"sw\000"
	.align	2
.LC12:
	.ascii	"terminal: throw switch #%d to be %s\015\012\000"
	.align	2
.LC13:
	.ascii	"terminal: incorrect argument for SW command\015\012"
	.ascii	"\000"
	.align	2
.LC14:
	.ascii	"wh\000"
	.align	2
.LC15:
	.ascii	"terminal: the last triggered sensor was %c%d\015\012"
	.ascii	"\000"
	.align	2
.LC16:
	.ascii	"q\000"
	.align	2
.LC17:
	.ascii	"terminal: quit\015\012\000"
	.align	2
.LC18:
	.ascii	"terminal: unknown command\015\012\000"
	.text
	.align	2
	.global	executeCommand
	.type	executeCommand, %function
executeCommand:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #24
	ldr	sl, .L120
.L119:
	add	sl, pc, sl
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+4
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #2
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L79
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L81
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmn	r3, #1
	beq	.L81
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	ip, [r3, #8]
	mov	r0, #1
	ldr	r3, .L120+8
	add	r3, sl, r3
	mov	r1, r3
	mov	r3, ip
	bl	bwprintf(PLT)
	bl	checkTime(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r3, .L120+12
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	b	.L118
.L81:
	mov	r0, #1
	ldr	r3, .L120+16
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	b	.L118
.L79:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+20
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #2
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L86
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L88
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #4]
	mov	r0, #1
	ldr	r3, .L120+24
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	bl	checkTime(PLT)
	mov	r0, #0
	mov	r1, #0
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	mov	r0, #500
	bl	stall(PLT)
	mov	r0, #0
	mov	r1, #15
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	mov	r0, #500
	bl	stall(PLT)
	ldr	r3, .L120+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	b	.L118
.L88:
	mov	r0, #1
	ldr	r3, .L120+28
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	b	.L118
.L86:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+32
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #2
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L91
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L93
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmp	r3, #255
	bgt	.L93
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	blt	.L93
	bl	checkTime(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-20]
	ldr	r2, [r3, #4]
	ldr	r3, .L120+36
	ldr	r3, [sl, r3]
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	cmp	r3, #83
	bne	.L97
	ldr	r3, .L120+40
	add	r3, sl, r3
	str	r3, [fp, #-36]
	b	.L99
.L97:
	ldr	r3, .L120+44
	add	r3, sl, r3
	str	r3, [fp, #-36]
.L99:
	mov	r0, #1
	ldr	r3, .L120+48
	add	r3, sl, r3
	mov	r1, r3
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-36]
	bl	bwprintf(PLT)
	b	.L118
.L93:
	mov	r0, #1
	ldr	r3, .L120+52
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	b	.L118
.L91:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+56
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #2
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L101
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	cmn	r3, #1
	beq	.L103
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmp	r3, #67
	beq	.L105
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmp	r3, #83
	bne	.L103
.L105:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmp	r3, #83
	bne	.L107
	ldr	r3, .L120+40
	add	r3, sl, r3
	str	r3, [fp, #-28]
	b	.L109
.L107:
	ldr	r3, .L120+44
	add	r3, sl, r3
	str	r3, [fp, #-28]
.L109:
	mov	r0, #1
	ldr	r3, .L120+60
	add	r3, sl, r3
	mov	r1, r3
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-28]
	bl	bwprintf(PLT)
	bl	checkTime(PLT)
	ldr	r3, [fp, #-20]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	and	r1, r3, #255
	ldr	r3, .L120+36
	ldr	r2, [sl, r3]
	mov	r3, r1
	strb	r3, [r2, r0]
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #8]
	cmp	r3, #83
	bne	.L110
	mov	r3, #33
	str	r3, [fp, #-24]
	b	.L112
.L110:
	mov	r3, #34
	str	r3, [fp, #-24]
.L112:
	mov	r0, #0
	ldr	r1, [fp, #-24]
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	mov	r0, #250
	bl	stall(PLT)
	mov	r0, #0
	mov	r1, #32
	bl	putc(PLT)
	b	.L118
.L103:
	mov	r0, #1
	ldr	r3, .L120+64
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	b	.L118
.L101:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+68
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #2
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L114
	bl	checkTime(PLT)
	bl	checkSensor(PLT)
	ldr	r3, .L120+72
	ldr	r3, [sl, r3]
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, .L120+76
	ldr	r3, [sl, r3]
	ldr	ip, [r3, #0]
	mov	r0, #1
	ldr	r3, .L120+80
	add	r3, sl, r3
	mov	r1, r3
	mov	r3, ip
	bl	bwprintf(PLT)
	b	.L118
.L114:
	ldr	r3, [fp, #-20]
	mov	r0, r3
	ldr	r3, .L120+84
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, #1
	bl	cmp(PLT)
	mov	r3, r0
	cmp	r3, #0
	beq	.L116
	mov	r0, #1
	ldr	r3, .L120+88
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	ldr	r3, .L120+92
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	b	.L118
.L116:
	mov	r0, #1
	ldr	r3, .L120+96
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
.L118:
	sub	sp, fp, #16
	ldmfd	sp, {sl, fp, sp, pc}
.L121:
	.align	2
.L120:
	.word	_GLOBAL_OFFSET_TABLE_-(.L119+8)
	.word	.LC0(GOTOFF)
	.word	.LC1(GOTOFF)
	.word	lastTrainSpeed(GOT)
	.word	.LC2(GOTOFF)
	.word	.LC3(GOTOFF)
	.word	.LC4(GOTOFF)
	.word	.LC5(GOTOFF)
	.word	.LC6(GOTOFF)
	.word	switches(GOT)
	.word	.LC7(GOTOFF)
	.word	.LC8(GOTOFF)
	.word	.LC9(GOTOFF)
	.word	.LC10(GOTOFF)
	.word	.LC11(GOTOFF)
	.word	.LC12(GOTOFF)
	.word	.LC13(GOTOFF)
	.word	.LC14(GOTOFF)
	.word	lastSensorChar(GOT)
	.word	lastSensorNum(GOT)
	.word	.LC15(GOTOFF)
	.word	.LC16(GOTOFF)
	.word	.LC17(GOTOFF)
	.word	ret(GOT)
	.word	.LC18(GOTOFF)
	.size	executeCommand, .-executeCommand
	.section	.rodata
	.align	2
.LC19:
	.ascii	"\0337\033[1;1H\033[2K%d:%d.%d\0338\000"
	.text
	.align	2
	.global	checkTime
	.type	checkTime, %function
checkTime:
	@ args = 0, pretend = 0, frame = 12
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #16
	ldr	sl, .L127
.L126:
	add	sl, pc, sl
	ldr	r3, .L127+4
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	str	r3, [fp, #-20]
	ldr	r3, .L127+8
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	ldr	r3, [fp, #-20]
	rsb	r2, r3, r2
	ldr	r3, .L127+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	cmp	r2, r3
	blt	.L125
	ldr	r3, .L127+8
	ldr	r2, [sl, r3]
	ldr	r3, [fp, #-20]
	str	r3, [r2, #0]
	ldr	r3, .L127+16
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	add	r2, r3, #1
	ldr	r3, .L127+16
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldr	r3, .L127+16
	ldr	r3, [sl, r3]
	ldr	r1, [r3, #0]
	ldr	r3, .L127+20
	smull	r2, r3, r1, r3
	mov	r2, r3, asr #2
	mov	r3, r1, asr #31
	rsb	r2, r3, r2
	ldr	r3, .L127+24
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldr	r3, .L127+24
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	ldr	r3, .L127+28
	smull	r1, r3, r2, r3
	add	r3, r3, r2
	mov	r1, r3, asr #5
	mov	r3, r2, asr #31
	rsb	r2, r3, r1
	ldr	r3, .L127+32
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldr	r3, .L127+32
	ldr	r3, [sl, r3]
	ldr	ip, [r3, #0]
	ldr	r3, .L127+24
	ldr	r3, [sl, r3]
	ldr	r1, [r3, #0]
	ldr	r3, .L127+28
	smull	r2, r3, r1, r3
	add	r3, r3, r1
	mov	r2, r3, asr #5
	mov	r3, r1, asr #31
	rsb	r2, r3, r2
	str	r2, [fp, #-28]
	ldr	r3, [fp, #-28]
	mov	r3, r3, asl #4
	ldr	r2, [fp, #-28]
	rsb	r3, r2, r3
	mov	r3, r3, asl #2
	rsb	r1, r3, r1
	str	r1, [fp, #-28]
	ldr	r3, .L127+16
	ldr	r3, [sl, r3]
	ldr	r1, [r3, #0]
	ldr	r3, .L127+20
	smull	r2, r3, r1, r3
	mov	r2, r3, asr #2
	mov	r3, r1, asr #31
	rsb	r2, r3, r2
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-24]
	mov	r3, r3, asl #2
	ldr	r2, [fp, #-24]
	add	r3, r3, r2
	mov	r3, r3, asl #1
	rsb	r1, r3, r1
	str	r1, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [sp, #0]
	mov	r0, #1
	ldr	r3, .L127+36
	add	r3, sl, r3
	mov	r1, r3
	mov	r2, ip
	ldr	r3, [fp, #-28]
	bl	bwprintf(PLT)
.L125:
	sub	sp, fp, #16
	ldmfd	sp, {sl, fp, sp, pc}
.L128:
	.align	2
.L127:
	.word	_GLOBAL_OFFSET_TABLE_-(.L126+8)
	.word	timer_value(GOT)
	.word	previous(GOT)
	.word	delta(GOT)
	.word	tens(GOT)
	.word	1717986919
	.word	secs(GOT)
	.word	-2004318071
	.word	mins(GOT)
	.word	.LC19(GOTOFF)
	.size	checkTime, .-checkTime
	.section	.rodata
	.align	2
.LC20:
	.ascii	"\015\012\000"
	.align	2
.LC21:
	.ascii	"> \000"
	.align	2
.LC22:
	.ascii	"\033[1D\033[0K\000"
	.text
	.align	2
	.global	checkInput
	.type	checkInput, %function
checkInput:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #16
	ldr	sl, .L142
.L141:
	add	sl, pc, sl
	ldr	r3, .L142+4
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	mov	r3, r3, lsr #4
	and	r3, r3, #1
	cmp	r3, #0
	bne	.L140
	ldr	r3, .L142+8
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	strb	r3, [fp, #-17]
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	ldr	r1, [r3, #0]
	ldr	r3, .L142+16
	ldr	r2, [sl, r3]
	ldrb	r3, [fp, #-17]
	strb	r3, [r2, r1]
	add	r2, r1, #1
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L132
	mov	r0, #1
	ldr	r3, .L142+20
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	mvn	r3, #0
	str	r3, [fp, #-28]
	mvn	r3, #0
	str	r3, [fp, #-24]
	sub	r2, fp, #32
	ldr	r3, .L142+16
	ldr	r3, [sl, r3]
	mov	r0, r3
	mov	r1, r2
	bl	parseCommand(PLT)
	bl	checkTime(PLT)
	sub	r3, fp, #32
	mov	r0, r3
	bl	executeCommand(PLT)
	ldr	r3, .L142+12
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	mov	r0, #1
	ldr	r3, .L142+24
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	b	.L140
.L132:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #127
	bne	.L134
	mov	r0, #1
	ldr	r3, .L142+28
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	sub	r2, r3, #2
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	cmp	r3, #0
	bge	.L140
	ldr	r3, .L142+12
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	b	.L140
.L134:
	ldr	r3, .L142+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	cmp	r3, #20
	bne	.L138
	ldr	r3, .L142+32
	ldr	r2, [sl, r3]
	mvn	r3, #0
	str	r3, [r2, #0]
.L138:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	mov	r0, #1
	mov	r1, r3
	bl	putc(PLT)
.L140:
	sub	sp, fp, #16
	ldmfd	sp, {sl, fp, sp, pc}
.L143:
	.align	2
.L142:
	.word	_GLOBAL_OFFSET_TABLE_-(.L141+8)
	.word	flags(GOT)
	.word	data(GOT)
	.word	ind(GOT)
	.word	str(GOT)
	.word	.LC20(GOTOFF)
	.word	.LC21(GOTOFF)
	.word	.LC22(GOTOFF)
	.word	ret(GOT)
	.size	checkInput, .-checkInput
	.align	2
	.global	checkSensor
	.type	checkSensor, %function
checkSensor:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {r4, sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #40
	ldr	sl, .L158
.L157:
	add	sl, pc, sl
	mov	r0, #0
	mov	r1, #133
	bl	putc(PLT)
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L145
.L146:
	ldr	r4, [fp, #-28]
	mov	r0, #0
	bl	getc(PLT)
	mov	r3, r0
	and	r1, r3, #255
	mvn	r2, #17
	sub	r0, fp, #20
	add	r3, r0, r4
	add	r2, r3, r2
	mov	r3, r1
	strb	r3, [r2, #0]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L145:
	ldr	r3, [fp, #-28]
	cmp	r3, #9
	ble	.L146
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	strb	r3, [fp, #-48]
	ldrb	r3, [fp, #-36]	@ zero_extendqisi2
	strb	r3, [fp, #-47]
	ldrb	r3, [fp, #-35]	@ zero_extendqisi2
	strb	r3, [fp, #-46]
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	strb	r3, [fp, #-45]
	ldrb	r3, [fp, #-33]	@ zero_extendqisi2
	strb	r3, [fp, #-44]
	ldrb	r3, [fp, #-32]	@ zero_extendqisi2
	strb	r3, [fp, #-43]
	ldrb	r3, [fp, #-31]	@ zero_extendqisi2
	strb	r3, [fp, #-42]
	ldrb	r3, [fp, #-30]	@ zero_extendqisi2
	strb	r3, [fp, #-41]
	ldrb	r3, [fp, #-29]	@ zero_extendqisi2
	strb	r3, [fp, #-40]
	ldrb	r3, [fp, #-38]	@ zero_extendqisi2
	strb	r3, [fp, #-39]
	mov	r3, #65
	strb	r3, [fp, #-58]
	mov	r3, #65
	strb	r3, [fp, #-57]
	mov	r3, #66
	strb	r3, [fp, #-56]
	mov	r3, #66
	strb	r3, [fp, #-55]
	mov	r3, #67
	strb	r3, [fp, #-54]
	mov	r3, #67
	strb	r3, [fp, #-53]
	mov	r3, #68
	strb	r3, [fp, #-52]
	mov	r3, #68
	strb	r3, [fp, #-51]
	mov	r3, #69
	strb	r3, [fp, #-50]
	mov	r3, #69
	strb	r3, [fp, #-49]
	bl	checkTime(PLT)
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L148
.L149:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L150
.L151:
	ldr	r3, [fp, #-28]
	mvn	r2, #27
	sub	r1, fp, #20
	add	r3, r1, r3
	add	r3, r3, r2
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-24]
	rsb	r3, r3, #7
	mov	r3, r2, asr r3
	and	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L152
	ldr	r3, [fp, #-28]
	mvn	r2, #37
	sub	r0, fp, #20
	add	r3, r0, r3
	add	r3, r3, r2
	ldrb	r1, [r3, #0]	@ zero_extendqisi2
	ldr	r3, .L158+4
	ldr	r2, [sl, r3]
	mov	r3, r1
	strb	r3, [r2, #0]
	ldr	r2, [fp, #-28]
	mov	r3, r2, asr #31
	mov	r1, r3, lsr #31
	add	r3, r2, r1
	and	r3, r3, #1
	rsb	r3, r1, r3
	mov	r2, r3, asl #3
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	add	r2, r3, #1
	ldr	r3, .L158+8
	ldr	r3, [sl, r3]
	str	r2, [r3, #0]
.L152:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L150:
	ldr	r3, [fp, #-24]
	cmp	r3, #7
	ble	.L151
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L148:
	ldr	r3, [fp, #-28]
	cmp	r3, #9
	ble	.L149
	sub	sp, fp, #20
	ldmfd	sp, {r4, sl, fp, sp, pc}
.L159:
	.align	2
.L158:
	.word	_GLOBAL_OFFSET_TABLE_-(.L157+8)
	.word	lastSensorChar(GOT)
	.word	lastSensorNum(GOT)
	.size	checkSensor, .-checkSensor
	.section	.rodata
	.align	2
.LC23:
	.ascii	"\033[2J\033[2;1H> \000"
	.text
	.align	2
	.global	initialize
	.type	initialize, %function
initialize:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	ldr	sl, .L163
.L162:
	add	sl, pc, sl
	ldr	r3, .L163+4
	ldr	r2, [sl, r3]
	ldr	r3, .L163+8
	str	r3, [r2, #0]
	ldr	r3, .L163+12
	ldr	r2, [sl, r3]
	ldr	r3, .L163+16
	str	r3, [r2, #0]
	ldr	r3, .L163+20
	ldr	r2, [sl, r3]
	ldr	r3, .L163+24
	str	r3, [r2, #0]
	ldr	r3, .L163+4
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	mvn	r3, #-268435456
	str	r3, [r2, #0]
	ldr	r3, .L163+12
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	ldr	r3, .L163+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	bic	r3, r3, #128
	str	r3, [r2, #0]
	ldr	r3, .L163+12
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	ldr	r3, .L163+12
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	orr	r3, r3, #192
	bic	r3, r3, #8
	str	r3, [r2, #0]
	ldr	r3, .L163+28
	ldr	r2, [sl, r3]
	mvn	r3, #-268435456
	str	r3, [r2, #0]
	ldr	r3, .L163+32
	ldr	r2, [sl, r3]
	mov	r3, #200
	str	r3, [r2, #0]
	ldr	r3, .L163+36
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	ldr	r3, .L163+40
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	ldr	r3, .L163+44
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	ldr	r3, .L163+48
	ldr	r2, [sl, r3]
	ldr	r3, .L163+52
	str	r3, [r2, #0]
	mov	r0, #0
	mov	r1, #2400
	bl	bwsetspeed(PLT)
	mov	r0, #0
	mov	r1, #0
	bl	bwsetfifo(PLT)
	ldr	r3, .L163+48
	ldr	r3, [sl, r3]
	ldr	r2, [r3, #0]
	ldr	r3, .L163+48
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	orr	r3, r3, #104
	bic	r3, r3, #3
	str	r3, [r2, #0]
	ldr	r3, .L163+56
	ldr	r2, [sl, r3]
	ldr	r3, .L163+60
	str	r3, [r2, #0]
	ldr	r3, .L163+64
	ldr	r2, [sl, r3]
	ldr	r3, .L163+68
	str	r3, [r2, #0]
	mov	r0, #1
	mov	r1, #1
	bl	bwsetfifo(PLT)
	mov	r0, #1
	ldr	r3, .L163+72
	add	r3, sl, r3
	mov	r1, r3
	bl	bwputstr(PLT)
	ldr	r3, .L163+76
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	ldr	r3, .L163+80
	ldr	r2, [sl, r3]
	mov	r3, #1
	str	r3, [r2, #0]
	ldr	r3, .L163+84
	ldr	r2, [sl, r3]
	mov	r3, #0
	str	r3, [r2, #0]
	ldr	r3, .L163+88
	ldr	r2, [sl, r3]
	mov	r3, #42
	strb	r3, [r2, #0]
	ldr	r3, .L163+92
	ldr	r2, [sl, r3]
	mov	r3, #48
	str	r3, [r2, #0]
	ldmfd	sp, {sl, fp, sp, pc}
.L164:
	.align	2
.L163:
	.word	_GLOBAL_OFFSET_TABLE_-(.L162+8)
	.word	loader(GOT)
	.word	-2139029376
	.word	control(GOT)
	.word	-2139029368
	.word	timer_value(GOT)
	.word	-2139029372
	.word	previous(GOT)
	.word	delta(GOT)
	.word	mins(GOT)
	.word	secs(GOT)
	.word	tens(GOT)
	.word	line(GOT)
	.word	-2138308600
	.word	flags(GOT)
	.word	-2138243048
	.word	data(GOT)
	.word	-2138243072
	.word	.LC23(GOTOFF)
	.word	ind(GOT)
	.word	ret(GOT)
	.word	lastTrainSpeed(GOT)
	.word	lastSensorChar(GOT)
	.word	lastSensorNum(GOT)
	.size	initialize, .-initialize
	.align	2
	.global	stall
	.type	stall, %function
stall:
	@ args = 0, pretend = 0, frame = 12
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #12
	ldr	sl, .L171
.L170:
	add	sl, pc, sl
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	mov	r3, r3, asl #1
	str	r3, [fp, #-24]
	ldr	r3, .L171+4
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r3, [r3, #0]
	str	r3, [fp, #-20]
	b	.L166
.L167:
	bl	checkTime(PLT)
	bl	checkInput(PLT)
	ldr	r3, .L171+8
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	cmp	r3, #1
	bne	.L169
.L166:
	ldr	r3, .L171+4
	ldr	r3, [sl, r3]
	ldr	r3, [r3, #0]
	ldr	r2, [r3, #0]
	ldr	r3, [fp, #-20]
	rsb	r2, r2, r3
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	blt	.L167
.L169:
	sub	sp, fp, #16
	ldmfd	sp, {sl, fp, sp, pc}
.L172:
	.align	2
.L171:
	.word	_GLOBAL_OFFSET_TABLE_-(.L170+8)
	.word	timer_value(GOT)
	.word	ret(GOT)
	.size	stall, .-stall
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Ondrej Ruttkay (20179429) - CS 452\015\012\000"
	.align	2
.LC25:
	.ascii	"terminal: initializing, please wait... \000"
	.align	2
.LC26:
	.ascii	"-\000"
	.align	2
.LC27:
	.ascii	"\033[1D%c\000"
	.align	2
.LC28:
	.ascii	"\015\012terminal: done initializing\015\012> \000"
	.text
	.align	2
	.global	resetState
	.type	resetState, %function
resetState:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	mov	ip, sp
	stmfd	sp!, {sl, fp, ip, lr, pc}
	sub	fp, ip, #4
	sub	sp, sp, #8
	ldr	sl, .L182
.L181:
	add	sl, pc, sl
	mov	r0, #1
	ldr	r3, .L182+4
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	mov	r0, #1
	ldr	r3, .L182+8
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	mov	r0, #0
	mov	r1, #0
	bl	putc(PLT)
	mov	r0, #0
	mov	r1, #24
	bl	putc(PLT)
	mov	r0, #250
	bl	stall(PLT)
	mov	r0, #0
	mov	r1, #0
	bl	putc(PLT)
	mov	r0, #0
	mov	r1, #25
	bl	putc(PLT)
	mov	r0, #250
	bl	stall(PLT)
	mov	r0, #0
	mov	r1, #133
	bl	putc(PLT)
	mov	r3, #45
	strb	r3, [fp, #-24]
	mov	r3, #92
	strb	r3, [fp, #-23]
	mov	r3, #124
	strb	r3, [fp, #-22]
	mov	r3, #47
	strb	r3, [fp, #-21]
	mov	r0, #1
	ldr	r3, .L182+12
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	mov	r3, #1
	str	r3, [fp, #-20]
	b	.L174
.L175:
	ldr	r2, [fp, #-20]
	mov	r3, r2, asr #31
	mov	r1, r3, lsr #30
	add	r3, r2, r1
	and	r3, r3, #3
	rsb	r3, r1, r3
	mvn	r2, #7
	sub	r1, fp, #16
	add	r3, r1, r3
	add	r3, r3, r2
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	mov	r0, #1
	ldr	r3, .L182+16
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	ldr	r1, [fp, #-20]
	ldr	r3, .L182+20
	ldr	r2, [sl, r3]
	mov	r3, #67
	strb	r3, [r2, r1]
	mov	r0, #0
	mov	r1, #34
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	mov	r0, #200
	bl	stall(PLT)
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L174:
	ldr	r3, [fp, #-20]
	cmp	r3, #18
	ble	.L175
	mov	r3, #153
	str	r3, [fp, #-20]
	b	.L177
.L178:
	ldr	r3, [fp, #-20]
	add	r2, r3, #2
	mov	r3, r2, asr #31
	mov	r1, r3, lsr #30
	add	r3, r2, r1
	and	r3, r3, #3
	rsb	r3, r1, r3
	mvn	r2, #7
	sub	r1, fp, #16
	add	r3, r1, r3
	add	r3, r3, r2
	ldrb	r3, [r3, #0]	@ zero_extendqisi2
	mov	r2, r3
	mov	r0, #1
	ldr	r3, .L182+16
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	ldr	r1, [fp, #-20]
	ldr	r3, .L182+20
	ldr	r2, [sl, r3]
	mov	r3, #67
	strb	r3, [r2, r1]
	mov	r0, #0
	mov	r1, #34
	bl	putc(PLT)
	ldr	r3, [fp, #-20]
	and	r3, r3, #255
	mov	r0, #0
	mov	r1, r3
	bl	putc(PLT)
	mov	r0, #200
	bl	stall(PLT)
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L177:
	ldr	r3, [fp, #-20]
	cmp	r3, #156
	ble	.L178
	mov	r0, #1
	ldr	r3, .L182+24
	add	r3, sl, r3
	mov	r1, r3
	bl	bwprintf(PLT)
	sub	sp, fp, #16
	ldmfd	sp, {sl, fp, sp, pc}
.L183:
	.align	2
.L182:
	.word	_GLOBAL_OFFSET_TABLE_-(.L181+8)
	.word	.LC24(GOTOFF)
	.word	.LC25(GOTOFF)
	.word	.LC26(GOTOFF)
	.word	.LC27(GOTOFF)
	.word	switches(GOT)
	.word	.LC28(GOTOFF)
	.size	resetState, .-resetState
	.comm	previous,4,4
	.comm	delta,4,4
	.comm	mins,4,4
	.comm	secs,4,4
	.comm	tens,4,4
	.comm	timer_value,4,4
	.comm	loader,4,4
	.comm	control,4,4
	.comm	line,4,4
	.comm	flags,4,4
	.comm	data,4,4
	.comm	str,20,1
	.comm	ind,4,4
	.comm	ret,4,4
	.comm	lastTrainSpeed,4,4
	.comm	lastSensorChar,1,1
	.comm	lastSensorNum,4,4
	.comm	switches,256,1
	.ident	"GCC: (GNU) 4.0.2"
